import axios from '@/libs/request/axios'
import QS from 'qs';
//获取界面数据
export const getEntryPageInfo = (applyNo) => {
    return axios.request({
        url: '/apply/contract/entry/info',
        data: QS.stringify({applyNo:applyNo},{arrayFormat: 'repeat'}),
        method: 'post',
        headers: { 'content-type': 'application/x-www-form-urlencoded' },
    })
}
//查询开户人
export const getAccountPerson = (applyNo) => {
    return axios.request({
        url: '/apply/contract/account/person',
        data: QS.stringify({applyNo:applyNo},{arrayFormat: 'repeat'}),
        method: 'post',
        headers: { 'content-type': 'application/x-www-form-urlencoded' },
    })
}
//保存合同信息录入的数据
export const saveToBackend = (params) => {
    return axios.request({
        url: '/apply/contract/save',
        data: params,
        method: 'post'
    })
}
//变更客户身份证有效期
export const saveCert = (params) => {
    return axios.request({
        url: '/apply/contract/saveCert',
        data: params,
        method: 'post'
    })
}
//Gps派单
export const distribute = (params) => {
    return axios.request({
        url: '/apply/contract/distribute',
        data: params,
        method: 'post'
    })
}
//获取客户变更信息
export const getCustChange = (params) => {
    return axios.request({
        url: '/apply/contract/getCustChange',
        data: params,
        method: 'post'
    })
}
//放款模式下拉值查询
export const getLendingMode = (applyNo) => {
    return axios.request({
        url: '/apply/contract/getLendingMode',
        data: QS.stringify({applyNo:applyNo},{arrayFormat: 'repeat'}),
        method: 'post',
        headers: { 'content-type': 'application/x-www-form-urlencoded' },
    })
}
export const getGpsSupplier = (params) => {
    return axios.request({
        url: '/apply/contract/getChannelBaseInfo',
        data: params,
        method: 'post',
    })
}
export const doVerify = (params) => {
    return axios.request({
        url: '/apply/Signing/doVerify',
        data: params,
        method: 'post',
    })
}
//提交合同信息录入的数据，执行mq
export const loanApplySubmitInfo = (params) => {
    return axios.request({
        url: '/apply/loan/loanApplySubmitInfo',
        data: params,
        method: 'post'
    })
}
//提交修改合同状态
export const commitEditStatus = (params) => {
    return axios.request({
        url: '/apply/contract/commitEditStatus',
        data: params,
        method: 'post'
    })
}

//获取界面数据
export const queryAllInfo = (applyNo) => {
    return axios.request({
        url: '/apply/contract/queryAllInfo',
        data: QS.stringify({applyNo:applyNo},{arrayFormat: 'repeat'}),
        method: 'post',
        headers: { 'content-type': 'application/x-www-form-urlencoded' },
    })
}
//获取开票单位
export const getdrawerParty = (params) => {
    return axios.request({
        url: '/apply/contract/getdrawerPartyByChannelId',
        data: params,
        method:'post'
    })
}
export const getWitnessInfo = (params) => {
    return axios.request({
        url: '/apply/contract/getWitnessInfo',
        data: params,
        method:'post'
    })
}
export const signBank = (params) => {
    return axios.request({
        url: '/apply/Signing/doSign',
        data: params,
        method:'post'
    })
}
export const getGpsFullName = (params) => {
    return axios.request({
        url: '/apply/contract/getGpsFullName',
        data: params,
        method:'post'
    })
}
export const getIsFirstMortgage = (params) => {
    return axios.request({
        url: '/apply/contract/getIsFirstMortgage',
        data: params,
        method: 'post',
    })
}
